using System.Collections.Generic;

namespace GameConfig
{
	public static class GameConfigReaderManager
	{
		public delegate void GameConfigReadBuffer(byte[] stream);
		public class BasicReader
		{
			public string assetbundle;
			public string asset;
			public GameConfigReadBuffer readBuffer;
		}
		public static readonly List<BasicReader> AllBasicReader;

		public class PreloadReader
		{
			public int assetid;
			public GameConfigReadBuffer readBuffer;
		}
		public static readonly List<PreloadReader> AllPreloadReader;

		static GameConfigReaderManager()
		{
			AllBasicReader = new List<BasicReader>()
			{ 
				new BasicReader()
				{
					assetbundle = "StartupConfig",
					asset = "Assets/Bundles/AutoGen/GameConfig/Asset.bytes",
					readBuffer = GameConfig.AssetReader.Read,
				},
				new BasicReader()
				{
					assetbundle = "StartupConfig",
					asset = "Assets/Bundles/AutoGen/GameConfig/Language.bytes",
					readBuffer = GameConfig.LanguageReader.Read,
				},
				new BasicReader()
				{
					assetbundle = "StartupConfig",
					asset = "Assets/Bundles/AutoGen/GameConfig/Scene.bytes",
					readBuffer = GameConfig.SceneReader.Read,
				},
				new BasicReader()
				{
					assetbundle = "StartupConfig",
					asset = "Assets/Bundles/AutoGen/GameConfig/Global.bytes",
					readBuffer = GameConfig.GlobalReader.Read,
				},
				new BasicReader()
				{
					assetbundle = "StartupConfig",
					asset = "Assets/Bundles/AutoGen/GameConfig/UI.bytes",
					readBuffer = GameConfig.UIReader.Read,
				},
			};

			AllPreloadReader = new List<PreloadReader>()
			{ 
				new PreloadReader()
				{
					assetid = 6,
					readBuffer = GameConfig.ItemReader.Read,
				},
				new PreloadReader()
				{
					assetid = 7,
					readBuffer = GameConfig.SkillReader.Read,
				},
			};
		}
	}
}
